<?php $this->load->view('header'); ?>
<?php $this->load->view('cuerpo'); ?>
<section id="dt_example">
    <div id="container">
        <table border="1" class="display" id="reporte_oc">
            <thead>
            	<tr>
            		<th colspan="10" style="text-align: justify;"></th>
            	</tr>
                <tr>
                    <th>N° ITEM</th>
                    <th>FECHA</th>
                    <th>TIPO CLIENTE</th>
                    <th>CLIENTE</th>
                    <th>SOLICITUD</th>
                    <th>TALLER</th>
                    <th>MARCA</th>
                    <th>MODELO</th>
                    <th>MONTO</th>
                    <th>VER</th>
                </tr>
            </thead>
            <tbody>
                <?php
                	$n = '';
                    foreach ($lstOrdenCompra as $data) {
                        $n +=1;
                ?>
                <tr>
                    <td><?php echo $n ?></td>
                    <td><?php echo date("d/m/Y", strtotime($data->fecha_registro)) ?></td>
                    <td>
                        <?php
                            if (($data->tipCliente) == INT_CLIENTE_INDIVIDUAL) {
                                echo STR_TXT_CLIENTE_INDIVIDUAL;
                            } else {
                                echo STR_TXT_CLIENTE_CORPORATIVO;
                            }
                        ?>
                    </td>
                    <td>
                    <?php
                            if (isset($data->nombre) && isset($data->apellidos)) {
                                echo $data->nombre . " " . $data->apellidos;
                            } else {
                                echo $data->razon . " " . $data->ruc;
                            }
                    ?>
                    </td>
                    <td><?php echo $data->id_solicitud ?></td>
                    <td><?php echo $data->taller ?></td>
                    <td><?php echo $data->marca ?></td>
                    <td><?php echo $data->modelo ?></td>
                    <td><?php echo $data->monto ?></td>
                    <td class="center">
                        <a href="<? echo base_url();?>index.php/orden/detalle?id=<?= $data->id ?>">
                            <img src="<? echo base_url();?>images/ver.png" width="20" height="20" />
                        </a>
                    </td>
                </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
</section>
<?php $this->load->view('footer'); ?>